package com.storage.common.enums;

/**
 * 付款记录类型
 *
 * @author wb-zh270168
 */
public enum AccountRecordType {

    ORDER(0, "订单预付款"),

    UNDER_LINE(1, "线下付款");

    private final int value;

    private final String desc;

    AccountRecordType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    /**
     * 根据 value 返回枚举
     * @param value
     * @return
     */
    public static AccountRecordType valueOf(int value) {
        for (AccountRecordType type : values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        return null;
    }
}
